package com.mes.task.domain;

import java.util.Date;
import java.util.List;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.Formula;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.JoinColumnOrFormula;
import org.hibernate.annotations.JoinColumnsOrFormulas;
import org.hibernate.annotations.JoinFormula;
import org.hibernate.annotations.Where;
import org.springframework.context.annotation.Lazy;

import com.mes.basicdata.domain.Dept;
import com.mes.basicdata.domain.Employee;
import com.mes.basicdata.domain.Part;
import com.mes.basicdata.domain.Routing;
import com.mes.basicdata.domain.TypesData;
import com.mes.common.domain.BasicModel;
import com.mes.inventory.domain.Warehouse;

/**
 * <p>
 * PartTask 零件任务
 * </p>
 * 
 */
@Entity()
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
@Table(name = "T_TASKS")
@BatchSize(size = 20)
@Lazy(value = true)
@Where(clause = "tasktype like '1%'")
// @Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class PartTask extends BasicModel {

	public final static int TASKSTATE_DRAG = 101; // 草稿
	public final static int TASKSTATE_DISASSEMBLE = 102; // 已分解
	public final static int TASKSTATE_PLANED = 103; // 已计划
	public final static int TASKSTATE_ARRANGE = 104; // 已投产
	public final static int TASKSTATE_STARTED = 105; // 已开始
	public final static int TASKSTATE_COMPLETED = 106; // 已完成
	public final static int TASKSTATE_CANCELED = 107; // 已取消
	public final static int TASKSTATE_COMMIT = 112; // 已提交检验

	public final static boolean SUSPENDED_YES = true; // 已取消
	public final static boolean SUSPENDED_NO = false; // 已取消

	public final static String TASKTYPE_VIRTUAL_DEMAND = "109";// 大产品生产任务
	public final static String TASKTYPE_VIRTUAL_PART = "110";// 中间组件生产任务
	public final static String TASKTYPE_VIRTUAL_AO = "111";// AO生产任务

	@Id
	@GenericGenerator(name = "taskUid", strategy = "assigned")
	@Column(name = "TASKUID")
	protected String taskUid;

	@Column(name = "TASKNAME")
	protected String taskName;

	// 任务号或者计划号
	@Column(name = "TASKID")
	protected String taskId;

	@Column(name = "PARENTUID")
	protected String parentTaskUid;
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARENTUID", insertable = false, updatable = false)
	protected PartTask parentTask;

	@Column(name = "SCHEDULESTART")
	protected Date scheduleStart;

	@Column(name = "SCHEDULEFINISH")
	protected Date scheduleFinish;

	@Column(name = "PLANSTART")
	protected Date planStart;

	@Column(name = "PLANFINISH")
	protected Date planFinish;

	@Column(name = "BASESTART")
	protected Date baseStart;

	@Column(name = "BASEFINISH")
	protected Date baseFinish;

	@Column(name = "ACTUALSTART")
	protected Date actualStart;

	@Column(name = "ACTUALFINISH")
	protected Date actualFinish;

	@Column(name = "EARLYSTART")
	protected Date earlyStart;

	@Column(name = "EARLYFINISH")
	protected Date earlyFinish;

	@Column(name = "LATESTART")
	protected Date lateStart;

	@Column(name = "LATEFINISH")
	protected Date lateFinish;

	@Column(name = "CONSTRAINTTYPE")
	protected Integer constraintType;

	@Column(name = "CONSTRAINTDATE")
	protected Date constraintDate;

	@Column(name = "TASKWORK")
	protected Float taskWork;

	@Column(name = "ESTITASKWORK")
	protected Float estiTaskWork;

	@Column(name = "COMPLETEWORK")
	protected Float completeWork;

	@Column(name = "TASKTYPE")
	protected String taskType;
//	@ForeignKey(name = "null")
//	@ManyToOne(fetch = FetchType.LAZY)
//	@JoinColumnsOrFormulas(value = {
//			@JoinColumnOrFormula(column = @JoinColumn(name = "TASKTYPE", referencedColumnName = "ID", nullable = true, insertable = false, updatable = false)),
//			@JoinColumnOrFormula(formula = @JoinFormula(value = "'tasktype'", referencedColumnName = "TYPESNAME")) })
//	protected TypesData taskTypeDesc;

	@Column(name = "TASKSTATE")
	protected Integer taskState;
//	@ForeignKey(name = "null")
//	@ManyToOne(fetch = FetchType.LAZY)
//	@JoinColumnsOrFormulas(value = {
//			@JoinColumnOrFormula(column = @JoinColumn(name = "TASKSTATE", referencedColumnName = "ID", nullable = true, insertable = false, updatable = false)),
//			@JoinColumnOrFormula(formula = @JoinFormula(value = "'taskstate'", referencedColumnName = "TYPESNAME")) })
//	protected TypesData taskStateDesc;

	@Column(name = "PRIORITY")
	protected Integer priority;

	@Column(name = "COMPLETEPERCENT", precision = 25, scale = 6)
	protected Float completePercent;

	/******************* 以上为Task的基本属性定义 *************************/

	@Column(name = "PART_NUMBER")
	protected String partUid;
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PART_NUMBER", insertable = false, updatable = false)
	protected Part part;

	// 对应物料的图号
	@Column(name = "PART_DRAWINGID")
	protected String partDrawingId;
	// 对应物料的名称
	@Column(name = "PART_NAME")
	protected String partName;
	// 对应物料的版次
	@Column(name = "PART_VERSIONID")
	protected String partVersionId;

	@Column(name = "MODEL")
	protected String model;

	@Column(name = "BATCHNUM")
	protected String batchNum;

	// 架次号
	@Column(name = "CONTIGNATION_NUMBER")
	private String contignationNumber;

//	@ForeignKey(name = "null")
//	@ManyToOne(fetch = FetchType.LAZY)
//	@JoinColumnsOrFormulas(value = {
//			@JoinColumnOrFormula(column = @JoinColumn(name = "PRIORITY", referencedColumnName = "ID", nullable = true, insertable = false, updatable = false)),
//			@JoinColumnOrFormula(formula = @JoinFormula(value = "'prio'", referencedColumnName = "TYPESNAME")) })
//	protected TypesData priorityDesc;

	/**
	 * 是否悬挂，悬挂任务不参与计划对接 零件任务可能存在质量问题，不处于在制品中
	 */
	@Column(name = "SUSPENDED", precision = 2, scale = 0)
	protected Boolean isSuspended;
	// /**
	// * 是否暂停，暂停任务不参与计划对接
	// * 零件任务并无任何质量问题，还处于在制品中
	// */
	// @Column(name="TEXT7",precision=2,scale=0)
	// protected Boolean paused;

	@Column(name = "LOCKED", precision = 2, scale = 0)
	protected Boolean isLocked;

	@Column(name = "PLANQTY", precision = 25, scale = 6)
	protected Float planQty;

	@Column(name = "DUEQTY", precision = 25, scale = 6)
	protected Float dueQty;

	@Column(name = "COMPLETEQTY", precision = 25, scale = 6)
	protected Float completeQty;

	@Column(name = "DELIVERYQTY", precision = 25, scale = 6)
	protected Float deliveryQty;

	@Column(name = "IS_URGENT")
	protected Boolean isUrgent;

	/**
	 * 请制部门
	 */
	@Column(name = "DEPTID")
	protected String deptUid;
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEPTID", insertable = false, updatable = false)
	protected Dept dept;

	/**
	 * 主制部门
	 */
	@Column(name = "MASTERSHOP")
	protected String masterShopUid;
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MASTERSHOP", insertable = false, updatable = false)
	protected Dept masterShop;

	@Column(name = "ROUTING")
	protected String routingUid;
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ROUTING", insertable = false, updatable = false)
	protected Routing routing;

	@Column(name = "BIGMODEL")
	protected String bigModel;

	@Column(name = "ROOTBATCHNUM")
	protected String rootBatchNum;

//	@Formula("(select nvl(sum(tl.linkqty),0)  from t_demandtasklinks tl where tl.preduid=TaskUID and tl.isIneffect=1)")
//	protected Float demandLinkQty;

	// @OneToMany(fetch=FetchType.LAZY, mappedBy = "partTask")
	@Transient
	protected List<OperationTask> operationTasks;

	@Column(name = "CURRENTOPERATIONTASKUID")
	protected String currentOperationTaskUid;
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CURRENTOPERATIONTASKUID", insertable = false, updatable = false)
	protected OperationTask currentOperationTask;

	/**
	 * 工种optype
	 */
	@Column(name = "OPTYPE", precision = 10, scale = 0)
	protected Integer opType;
//	// many-to-one
//	@ForeignKey(name = "null")
//	@ManyToOne(fetch = FetchType.LAZY)
//	@JoinColumnsOrFormulas(value = {
//			@JoinColumnOrFormula(column = @JoinColumn(name = "OPTYPE", referencedColumnName = "ID", nullable = true, insertable = false, updatable = false)),
//			@JoinColumnOrFormula(formula = @JoinFormula(value = "'optype'", referencedColumnName = "TYPESNAME")) })
//	protected TypesData opTypeDesc;

	/**
	 * 是否关键
	 */
	@Column(name = "IS_CRITICAL_OPERATION")
	protected Integer isCritical; // 是否关键件,改成Long支持多个关键级别

	@Column(name = "IS_READY")
	protected Boolean isReady;; // 是否齐套

	@Column(name = "TASK_MANAGER")
	protected String taskManagerUid;; // 任务负责人

	@Column(name = "SLACKFACTOR", precision = 10, scale = 2)
	protected Float slackFactor;

	@Column(name = "REASONCODE")
	protected String reasonCode;

	public PartTask() {
	}

	public Integer getIsCritical() {
		return isCritical;
	}

	public void setIsCritical(Integer isCritical) {
		this.isCritical = isCritical;
	}

	/**
	 * @return the partUid
	 */
	public String getPartUid() {
		return partUid;
	}

	/**
	 * @param partUid
	 *            the partUid to set
	 */
	public void setPartUid(String partUid) {
		this.partUid = partUid;
	}

	/**
	 * @return the part
	 */
	public Part getPart() {
		return part;
	}

	/**
	 * @param part
	 *            the part to set
	 */
	public void setPart(Part part) {
		this.part = part;
	}

	/**
	 * @return the model
	 */
	public String getModel() {
		return model;
	}

	/**
	 * @param model
	 *            the model to set
	 */
	public void setModel(String model) {
		this.model = model;
	}

	/**
	 * @return the batchNum
	 */
	public String getBatchNum() {
		return batchNum;
	}

	/**
	 * @param batchNum
	 *            the batchNum to set
	 */
	public void setBatchNum(String batchNum) {
		this.batchNum = batchNum;
	}

	/**
	 * @return the earlyStart
	 */
	public Date getEarlyStart() {
		return earlyStart;
	}

	/**
	 * @param earlyStart
	 *            the earlyStart to set
	 */
	public void setEarlyStart(Date earlyStart) {
		this.earlyStart = earlyStart;
	}

	/**
	 * @return the earlyFinish
	 */
	public Date getEarlyFinish() {
		return earlyFinish;
	}

	/**
	 * @param earlyFinish
	 *            the earlyFinish to set
	 */
	public void setEarlyFinish(Date earlyFinish) {
		this.earlyFinish = earlyFinish;
	}

	/**
	 * @return the lateStart
	 */
	public Date getLateStart() {
		return lateStart;
	}

	/**
	 * @param lateStart
	 *            the lateStart to set
	 */
	public void setLateStart(Date lateStart) {
		this.lateStart = lateStart;
	}

	/**
	 * @return the lateFinish
	 */
	public Date getLateFinish() {
		return lateFinish;
	}

	/**
	 * @param lateFinish
	 *            the lateFinish to set
	 */
	public void setLateFinish(Date lateFinish) {
		this.lateFinish = lateFinish;
	}

	/**
	 * @return the scheduleStart
	 */
	public Date getScheduleStart() {
		return scheduleStart;
	}

	/**
	 * @param scheduleStart
	 *            the scheduleStart to set
	 */
	public void setScheduleStart(Date scheduleStart) {
		this.scheduleStart = scheduleStart;
	}

	/**
	 * @return the scheduleFinish
	 */
	public Date getScheduleFinish() {
		return scheduleFinish;
	}

	/**
	 * @param scheduleFinish
	 *            the scheduleFinish to set
	 */
	public void setScheduleFinish(Date scheduleFinish) {
		this.scheduleFinish = scheduleFinish;
	}

	/**
	 * @return the actualStart
	 */
	public Date getActualStart() {
		return actualStart;
	}

	/**
	 * @param actualStart
	 *            the actualStart to set
	 */
	public void setActualStart(Date actualStart) {
		this.actualStart = actualStart;
	}

	/**
	 * @return the actualFinish
	 */
	public Date getActualFinish() {
		return actualFinish;
	}

	/**
	 * @param actualFinish
	 *            the actualFinish to set
	 */
	public void setActualFinish(Date actualFinish) {
		this.actualFinish = actualFinish;
	}

	/**
	 * @return the planStart
	 */
	public Date getPlanStart() {
		return planStart;
	}

	/**
	 * @param planStart
	 *            the planStart to set
	 */
	public void setPlanStart(Date planStart) {
		this.planStart = planStart;
	}

	/**
	 * @return the planFinish
	 */
	public Date getPlanFinish() {
		return planFinish;
	}

	/**
	 * @param planFinish
	 *            the planFinish to set
	 */
	public void setPlanFinish(Date planFinish) {
		this.planFinish = planFinish;
	}

	/**
	 * @return the taskType
	 */
	public String getTaskType() {
		return taskType;
	}

	/**
	 * @param taskType
	 *            the taskType to set
	 */
	public void setTaskType(String taskType) {
		this.taskType = taskType;
	}

	/**
	 * @return the planQty
	 */
	public Float getPlanQty() {
		return planQty == null ? 0 : planQty;
	}

	/**
	 * @param planQty
	 *            the planQty to set
	 */
	public void setPlanQty(Float planQty) {
		this.planQty = planQty;
	}

	/**
	 * @return the completeQty
	 */
	public Float getCompleteQty() {
		return completeQty;
	}

	/**
	 * @param completeQty
	 *            the completeQty to set
	 */
	public void setCompleteQty(Float completeQty) {
		this.completeQty = completeQty;
	}

	/**
	 * @return the deliveryQty
	 */
	public Float getDeliveryQty() {
		return deliveryQty;
	}

	/**
	 * @param deliveryQty
	 *            the deliveryQty to set
	 */
	public void setDeliveryQty(Float deliveryQty) {
		this.deliveryQty = deliveryQty;
	}

	/**
	 * @return the completePercent
	 */
	public Float getCompletePercent() {
		return completePercent;
	}

	/**
	 * @param completePercent
	 *            the completePercent to set
	 */
	public void setCompletePercent(Float completePercent) {
		this.completePercent = completePercent;
	}

	/**
	 * @return the taskWork
	 */
	public Float getTaskWork() {
		return taskWork;
	}

	/**
	 * @param taskWork
	 *            the taskWork to set
	 */
	public void setTaskWork(Float taskWork) {
		this.taskWork = taskWork;
	}

	/**
	 * @return the completeWork
	 */
	public Float getCompleteWork() {
		return completeWork;
	}

	/**
	 * @param completeWork
	 *            the completeWork to set
	 */
	public void setCompleteWork(Float completeWork) {
		this.completeWork = completeWork;
	}

	/**
	 * @return the deptUid
	 */
	public String getDeptUid() {
		return deptUid;
	}

	/**
	 * @param deptUid
	 *            the deptUid to set
	 */
	public void setDeptUid(String deptUid) {
		this.deptUid = deptUid;
	}

	/**
	 * @return the dept
	 */
	public Dept getDept() {
		return dept;
	}

	/**
	 * @param dept
	 *            the dept to set
	 */
	public void setDept(Dept dept) {
		this.dept = dept;
	}

	/**
	 * @return the masterShopUid
	 */
	public String getMasterShopUid() {
		return masterShopUid;
	}

	/**
	 * @param masterShopUid
	 *            the masterShopUid to set
	 */
	public void setMasterShopUid(String masterShopUid) {
		this.masterShopUid = masterShopUid;
	}

	/**
	 * @return the masterShop
	 */
	public Dept getMasterShop() {
		return masterShop;
	}

	/**
	 * @param masterShop
	 *            the masterShop to set
	 */
	public void setMasterShop(Dept masterShop) {
		this.masterShop = masterShop;
	}

	/**
	 * @return the creator
	 */
	public Employee getCreator() {
		return creator;
	}

	/**
	 * @param creator
	 *            the creator to set
	 */
	public void setCreator(Employee creator) {
		this.creator = creator;
	}

	/**
	 * @return the routingUid
	 */
	public String getRoutingUid() {
		return routingUid;
	}

	/**
	 * @param routingUid
	 *            the routingUid to set
	 */
	public void setRoutingUid(String routingUid) {
		this.routingUid = routingUid;
	}

	/**
	 * @return the routing
	 */
	public Routing getRouting() {
		return routing;
	}

	/**
	 * @param routing
	 *            the routing to set
	 */
	public void setRouting(Routing routing) {
		this.routing = routing;
	}

	/**
	 * @return the taskState
	 */
	public Integer getTaskState() {
		return taskState;
	}

	/**
	 * @param taskState
	 *            the taskState to set
	 */
	public void setTaskState(Integer taskState) {
		this.taskState = taskState;
	}

	/**
	 * @return the priority
	 */
	public Integer getPriority() {
		return priority;
	}

	/**
	 * @param priority
	 *            the priority to set
	 */
	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	/**
	 * @return the suspended
	 */
	public Boolean getIsSuspended() {
		return isSuspended;
	}

	/**
	 * @param suspended
	 *            the suspended to set
	 */
	public void setSuspended(Boolean isSuspended) {
		this.isSuspended = isSuspended;
	}

	/**
	 * @return the locked
	 */
	public Boolean getIsLocked() {
		return isLocked;
	}

	/**
	 * @param locked
	 *            the locked to set
	 */
	public void setIsLocked(Boolean isLocked) {
		this.isLocked = isLocked;
	}

	/**
	 * @return the bigModel
	 */
	public String getBigModel() {
		return bigModel;
	}

	/**
	 * @param bigModel
	 *            the bigModel to set
	 */
	public void setBigModel(String bigModel) {
		this.bigModel = bigModel;
	}

	/**
	 * @return the rootBatchNum
	 */
	public String getRootBatchNum() {
		return rootBatchNum;
	}

	/**
	 * @param rootBatchNum
	 *            the rootBatchNum to set
	 */
	public void setRootBatchNum(String rootBatchNum) {
		this.rootBatchNum = rootBatchNum;
	}

	/**
	 * @return the operationTasks
	 */
	public List<OperationTask> getOperationTasks() {
		return operationTasks;
	}

	/**
	 * @param operationTasks
	 *            the operationTasks to set
	 */
	public void setOperationTasks(List<OperationTask> operationTasks) {
		this.operationTasks = operationTasks;
	}

	/**
	 * @return the parentTaskUid
	 */
	public String getParentTaskUid() {
		return parentTaskUid;
	}

	/**
	 * @param parentTaskUid
	 *            the parentTaskUid to set
	 */
	public void setParentTaskUid(String parentTaskUid) {
		this.parentTaskUid = parentTaskUid;
	}

	/**
	 * @return the parentTask
	 */
	public PartTask getParentTask() {
		return parentTask;
	}

	/**
	 * @param parentTask
	 *            the parentTask to set
	 */
	public void setParentTask(PartTask parentTask) {
		this.parentTask = parentTask;
	}

	public String getCurrentOperationTaskUid() {
		return currentOperationTaskUid;
	}

	public void setCurrentOperationTaskUid(String currentOperationTaskUid) {
		this.currentOperationTaskUid = currentOperationTaskUid;
	}

	public OperationTask getCurrentOperationTask() {
		// OperationTask maxTemp = null;
		// OperationTask minTemp = null;
		// for (Iterator<OperationTask> iterator =
		// this.getOperationTasks().iterator(); iterator.hasNext();) {
		// OperationTask operationTaskTemp = iterator.next();
		// if (operationTaskTemp.getTaskstate() > 206) {
		// maxTemp = operationTaskTemp;
		// }
		// if (minTemp == null && operationTaskTemp.getTaskstate() < 209) {
		// minTemp = operationTaskTemp;
		// }
		// }
		// return (maxTemp != null) ? maxTemp : minTemp;
		return currentOperationTask;
	}

	public void setCurrentOperationTask(OperationTask currentOperationTask) {
		this.currentOperationTask = currentOperationTask;
	}

	public Float getDueQty() {
		return dueQty;
	}

	public void setDueQty(Float dueQty) {
		this.dueQty = dueQty;
	}

	public String getTaskUid() {
		return taskUid;
	}

	public void setTaskUid(String taskUid) {
		this.taskUid = taskUid;
	}

	@Override
	public String getUuid() {
		// TODO Auto-generated method stub
		return this.taskUid;
	}

	@Override
	public void setUuid(String uuid) {
		// TODO Auto-generated method stub
		this.taskUid = uuid;
	}

	public String getTaskName() {
		return taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	// public Boolean getPaused() {
	// return paused;
	// }
	//
	// public void setPaused(Boolean paused) {
	// this.paused = paused;
	// }

	public Float getSlackFactor() {
		return slackFactor;
	}

	public void setSlackFactor(Float slackFactor) {
		this.slackFactor = slackFactor;
	}

	public Boolean getIsUrgent() {
		return isUrgent;
	}

	public void setIsUrgent(Boolean isUrgent) {
		this.isUrgent = isUrgent;
	}

	public String getReasonCode() {
		return reasonCode;
	}

	public void setReasonCode(String reasonCode) {
		this.reasonCode = reasonCode;
	}

	public String getTaskManagerUid() {
		return taskManagerUid;
	}

	public void setTaskManagerUid(String taskManagerUid) {
		this.taskManagerUid = taskManagerUid;
	}

	public Integer getOpType() {
		return opType;
	}

	public void setOpType(Integer opType) {
		this.opType = opType;
	}

	public Boolean getIsReady() {
		return isReady;
	}

	public void setIsReady(Boolean isReady) {
		this.isReady = isReady;
	}

	public String getContignationNumber() {
		return contignationNumber;
	}

	public void setContignationNumber(String contignationNumber) {
		this.contignationNumber = contignationNumber;
	}

	public String getPartDrawingId() {
		return partDrawingId;
	}

	public void setPartDrawingId(String partDrawingId) {
		this.partDrawingId = partDrawingId;
	}

	public String getPartName() {
		return partName;
	}

	public void setPartName(String partName) {
		this.partName = partName;
	}

	public String getPartVersionId() {
		return partVersionId;
	}

	public void setPartVersionId(String partVersionId) {
		this.partVersionId = partVersionId;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public Date getBaseStart() {
		return baseStart;
	}

	public void setBaseStart(Date baseStart) {
		this.baseStart = baseStart;
	}

	public Date getBaseFinish() {
		return baseFinish;
	}

	public void setBaseFinish(Date baseFinish) {
		this.baseFinish = baseFinish;
	}

	public Integer getConstraintType() {
		return constraintType;
	}

	public void setConstraintType(Integer constraintType) {
		this.constraintType = constraintType;
	}

	public Date getConstraintDate() {
		return constraintDate;
	}

	public void setConstraintDate(Date constraintDate) {
		this.constraintDate = constraintDate;
	}

	public Float getEstiTaskWork() {
		return estiTaskWork;
	}

	public void setEstiTaskWork(Float estiTaskWork) {
		this.estiTaskWork = estiTaskWork;
	}

	public void setIsSuspended(Boolean isSuspended) {
		this.isSuspended = isSuspended;
	}

	/**
	 * 大纲级别，用于设置优先级 hba
	 * aad by lcs 用于AO任务管理优先级展示
	 */
	@Column(name = "OUTLINELEVEL")
	protected String outLineLevel;

	public String getOutLineLevel() {
		return outLineLevel;
	}

	public void setOutLineLevel(String outLineLevel) {
		this.outLineLevel = outLineLevel;
	}
	
}
